//---------------------------------------------------------------------------
//
// Name:        DeadProxyFrm.h
// Author:      Carl Chatfield
// Created:     1/5/2008 6:48:54 PM
// Description: DeadProxyFrm class declaration
//
//---------------------------------------------------------------------------

#ifndef __DEADPROXYFRM_h__
#define __DEADPROXYFRM_h__

#ifdef __BORLANDC__
	#pragma hdrstop
#endif

#ifndef WX_PRECOMP
	#include <wx/wx.h>
	#include <wx/frame.h>
#else
	#include <wx/wxprec.h>
#endif

//Do not add custom headers between 
//Header Include Start and Header Include End.
//wxDev-C++ designer will remove them. Add custom headers after the block.
////Header Include Start
#include <wx/combobox.h>
#include <wx/toolbar.h>
#include <wx/tglbtn.h>
#include <wx/textctrl.h>
#include <wx/stattext.h>
#include <wx/button.h>
#include <wx/radiobox.h>
#include <wx/listbox.h>
#include <wx/statbox.h>
#include <wx/panel.h>
#include <wx/notebook.h>
////Header Include End
////Custom Header Include Start
#include "MiniClientCanvas.h"

#include "DeadProxyEventLogMessage.h"
#include "DeadProxyGUIEvent.h"
////Custom Header Include End

////Dialog Style Start
#undef DeadProxyFrm_STYLE
#define DeadProxyFrm_STYLE wxCAPTION | wxSYSTEM_MENU | wxMINIMIZE_BOX | wxCLOSE_BOX
////Dialog Style End

class DeadProxyFrm : public wxFrame
{
	private:
		DECLARE_EVENT_TABLE();
		
	public:
        int ClientIndex;
        
		DeadProxyFrm(wxWindow *parent, wxWindowID id = 1, const wxString &title = wxT("DeadProxy"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = DeadProxyFrm_STYLE);
		virtual ~DeadProxyFrm();
		//Start Custom Event Functions
		void LogMessage(wxLogMessageEvent& event);
		void UpdatePacketBox(wxGUIEvent & event);
		void UpdateClientBox(wxGUIEvent & event);
		void OnClientSelected(int index);
		void SetPacketString(wxGUIEvent & event);
		void InitClientSelect(wxGUIEvent & event);
		void SetMessageInfo(wxGUIEvent & event);
		void SetMessageArray(wxGUIEvent & event);
		void UpdateChannelBox(wxGUIEvent & event);
		void UpdateMessageBox(wxGUIEvent & event);
		//End Custom Event Functions
		//Overwrite winproc so we can recv windows events
		virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
		//
		void TestButtonClick(wxCommandEvent& event);
		void LaunchClientButtonClick(wxCommandEvent& event);
		void WxCheckBox1Click(wxCommandEvent& event);
		void ShowPacketsCheckboxClick(wxCommandEvent& event);
		void ShowPacketsToggleButtonClick(wxCommandEvent& event);
		void ClientSelectListBoxSelected(wxCommandEvent& event);
		void LogPacketsRadioBoxClick(wxCommandEvent& event);
		void SelectPacketListBoxSelected(wxCommandEvent& event);
		void ClearPacketsClick(wxCommandEvent& event);
		void ClearPacketsClick1(wxCommandEvent& event);
		void ClearPacketsButtonClick(wxCommandEvent& event);
		void ClearLogButtonClick(wxCommandEvent& event);
		void WxComboBox1Selected(wxCommandEvent& event );
		void ToolBarClientSelectComboBoxSelected(wxCommandEvent& event );
		
		
		MiniClientCanvas* pMiniClientCanvas;
		void ChannelListBoxSelected(wxCommandEvent& event);
		void MessageListBoxSelected(wxCommandEvent& event);
		void MIClearChannelButtonClick(wxCommandEvent& event);
		void MIClearAllLogsButtonClick(wxCommandEvent& event);
	private:
		//Do not add custom control declarations between
		//GUI Control Declaration Start and GUI Control Declaration End.
		//wxDev-C++ will remove them. Add custom code after the block.
		////GUI Control Declaration Start
		wxComboBox *ToolBarClientSelectComboBox;
		wxToolBar *WxToolBar1;
		wxButton *MIClearAllLogsButton;
		wxButton *MIClearChannelButton;
		wxStaticText *MIMessageStaticText;
		wxTextCtrl *MIMessageEditBox;
		wxTextCtrl *MITimeEditBox;
		wxStaticText *MITimeStaticText;
		wxTextCtrl *MIChannelEditBox;
		wxStaticText *MIChannelStaticText;
		wxStaticText *SenderStaticText;
		wxTextCtrl *MISenderEditBox;
		wxStaticBox *MessageInfoStaticBox;
		wxListBox *MessageListBox;
		wxStaticBox *LogStaticBox;
		wxListBox *ChannelListBox;
		wxStaticBox *ChannelsStaticBox;
		wxPanel *MsgLogNoteBookPage;
		wxPanel *GameNoteBookPage;
		wxTextCtrl *PacketEditBox;
		wxButton *ClearPacketsButton;
		wxButton *ClearLogButton;
		wxToggleButton *ShowPacketsToggleButton;
		wxTextCtrl *OutputEditBox;
		wxButton *TestButton;
		wxStaticText *FileNameStaticText;
		wxButton *LaunchClientButton;
		wxButton *SelectFileButton;
		wxListBox *SelectPacketListBox;
		wxRadioBox *LogPacketsRadioBox;
		wxStaticBox *PacketsStaticBox;
		wxListBox *ClientSelectListBox;
		wxStaticBox *WxStaticBox1;
		wxPanel *WxProxyPage;
		wxNotebook *MainNotebook;
		////GUI Control Declaration End
		
	private:
		//Note: if you receive any error with these enum IDs, then you need to
		//change your old form code that are based on the #define control IDs.
		//#defines may replace a numeric value for the enum names.
		//Try copy and pasting the below block in your old form header files.
		enum
		{
			////GUI Enum Control ID Start
			ID_TOOLBARCLIENTSELECTCOMBOBOX = 1029,
			ID_WXTOOLBAR1 = 1028,
			ID_MICLEARALLLOGSBUTTON = 1050,
			ID_MICLEARCHANNELBUTTON = 1049,
			ID_MIMESSAGESTATICTEXT = 1048,
			ID_MIMESSAGEEDITBOX = 1047,
			ID_MITIMEEDITBOX = 1046,
			ID_MITIMESTATICTEXT = 1045,
			ID_MICHANNELEDITBOX = 1044,
			ID_MICHANNELSTATICTEXT = 1043,
			ID_SENDERSTATICTEXT = 1042,
			ID_MISENDEREDITBOX = 1041,
			ID_MESSAGEINFOSTATICBOX = 1040,
			ID_MESSAGELISTBOX = 1038,
			ID_LOGSTATICBOX = 1037,
			ID_CHANNELLISTBOX = 1036,
			ID_CHANNELSSTATICBOX = 1035,
			ID_MSGLOGNOTEBOOKPAGE = 1031,
			ID_GAMENOTEBOOKPAGE = 1030,
			ID_PACKETEDITBOX = 1027,
			ID_CLEARPACKETSBUTTON = 1026,
			ID_CLEARLOGBUTTON = 1025,
			ID_SHOWPACKETSTOGGLEBUTTON = 1024,
			ID_OUTPUTEDITBOX = 1022,
			ID_TESTBUTTON = 1021,
			ID_FILENAMESTATICTEXT = 1020,
			ID_LAUNCHCLIENTBUTTON = 1019,
			ID_SELECTFILEBUTTON = 1018,
			ID_SELECTPACKETLISTBOX = 1015,
			ID_LOGPACKETSRADIOBOX = 1009,
			ID_PACKETSSTATICBOX = 1008,
			ID_CLIENTSELECTLISTBOX = 1007,
			ID_WXSTATICBOX1 = 1006,
			ID_WXPROXYPAGE = 1002,
			ID_MAINNOTEBOOK = 1001,
			////GUI Enum Control ID End
			ID_DUMMY_VALUE_, //don't remove this value unless you have other enum values
			
			ID_MINICLIENTCANVAS = 5001
		};
		
	private:
		void OnClose(wxCloseEvent& event);
		void CreateGUIControls();
};

#endif
